cd "S:\Katja_Aksel\JFQA index paper\v3\pseudo_data"
clear
set more 1
cap log close

log using ./logs/Table4a.log, replace

*****Table 4
use ./5_postmoney_valuations_failures.dta, clear
keep orgnr final sample vcbacked
duplicates drop
*78,111 firms
gen final1=(final==1)
gen final2=(final==2)
gen final3=(final==3)
gen final4=(final==4)
gen final5=(final==5)
gen final6=(final==6)
gen final7=(final==7)
gen final8=(final==8)

outreg2 using ./tables/Table4a.xls if sample==1, replace sum(detail) keep(final1 final2 final3 final4 final5 final6 final7 final8) eqkeep(N mean)
outreg2 using ./tables/Table4a.xls if sample==1 & vcbacked==1, append sum(detail) keep(final1 final2 final3 final4 final5 final6 final7 final8) eqkeep(N mean)
outreg2 using ./tables/Table4a.xls if sample==0, append sum(detail) keep(final1 final2 final3 final4 final5 final6 final7 final8) eqkeep(N mean)







